home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 38 / 038.d81 / bingo simulator (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  213 lines

  1. 5 gosub60100:clr
  2. 10 poke53280,0:poke53281,0
  3. 50 print "[147][159]      [195]reated by:  [158][210]ichard [210]ager"
  4. 80 print tab(9)"[195] [154]- [208]rint card"
  5. 90 print tab(9)"[194] [154]- [208]lay [194].[201].[206].[199].[207]."
  6. 95 print tab(9)"[209] [154]- [209]uit"
  7. 100 print tab(9)"[154][208]ress [195][154], [194][154], or [209][154]."
  8. 110 poke646,c:print"";tab(9);"[194].[201].[206].[199].[207]. [211]imulator"
  9. 120 a=peek(203):ifa=28ora=20ora=62then150
  10. 140 ifc=15thenc=1:goto110
  11. 150 ifa=28then180
  12. 160 ifa=20then670
  13. 165 ifa=62thengosub60000:goto100
  14. 170 c=c+1:goto110
  15. 180 rem play game
  16. 190 print "[147]";:mi=.
  17. 200 printtab(15)"[176][192][192][192][192][192][192][174]"
  18. 210 print"   [150] [209] [146] [209][213][201][212][211]   [221]      [221]    [150] [209] [146] [209][213][201][212][211]"
  19. 220 printtab(15)"[173][192][192][192][192][192][192][189]"
  20. 230 m1$="[176][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][174]":printm1$;
  21. 235 m2$="[221]    [221]    [221]    [221]    [221]    [221]    [221]    [221]   [221]"
  22. 236 m3$="[171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][179]"
  23. 237 m4$="[173][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][189]"
  24. 240 for a=1to9
  25. 250 printm2$;
  26. 260 printm3$;
  27. 270 next a
  28. 280 printm2$;
  29. 290 printm4$;
  30. 300 print"[158][194]";
  31. 310 print"01020304050607"
  32. 320 print"0809101112131415"
  33. 330 print"[158][201]16171819202122"
  34. 340 print"2324252627282930"
  35. 350 print"[158][206]31323334353637"
  36. 360 print"3839404142434445"
  37. 370 print"[158][199]46474849505152"
  38. 380 print"5354555657585960"
  39. 390 print"[158][207]61626364656667"
  40. 400 print"6869707172737475"
  41. 410 printtab(5)"[154][208]ress [211][208][193][195][197] [194][193][210] [154]for next number.";:ifquthenqu=.:goto540
  42. 420 print""tab(17)"    "
  43. 430 b$(1)="[194]":b$(2)="[201]":b$(3)="[206]"
  44. 440 b$(4)="[199]":b$(5)="[207]":mi=mi+1
  45. 450 lc=int(rnd(0)*5)+1
  46. 460 nc=int(rnd(0)*15)+1
  47. 470 nn=nc+((lc-1)*15)
  48. 480 sc=55463
  49. 490 ss=sc+((lc-1)*160)+((nc-1)*5)+((nc>7)*-40)
  50. 500 ifss>56295thenend
  51. 505 gosub2000
  52. 510 if(peek(ss)and15)=15then450
  53. 515 print"";:gosub2010
  54. 520 pokess,15:pokess+1,15
  55. 530 print""tab(17)""b$(lc)nn:poke198,.
  56. 535 ifmi>74then3000
  57. 540 a=peek(203):ifa<>60anda<>62then540
  58. 550 ifa=60then420
  59. 560 gosub60060
  60. 570 goto410
  61. 670 rem print cards
  62. 680 printchr$(14)chr$(8)"[147]";tab(9);"[194].[201].[206].[199].[207]. [211]imulator"
  63. 700 print "[159]      [195]reated by:  [210]ichard [210]ager"
  64. 720 print
  65. 730 print"[154][197]nter number of cards to make:"
  66. 735 print"([208]ress [210][197][212][213][210][206] alone to exit.)"
  67. 740 print"-->";:gosub60500:cc=val(b$)
  68. 745 ifb$=""then10
  69. 750 print
  70. 760 print"    [154][208]ress [211][208][193][195][197] [154]when ready to print.":print
  71. 780 ifpeek(203)<>60then780
  72. 790 print"[145][145][145][145][145][145]";
  73. 800 fora=1to6
  74. 810 print"                                       "
  75. 820 next:print"[145][145][145][145][145][145][145]"
  76. 821 open15,4,15:close15:ifst=0 then 830
  77. 822 poke53281,1:poke53281,.:print"   [208]rinter ([196]evice #4) [206]ot [196]etected."
  78. 823 print"[154]  [208]ress [152]([211][208][193][195][197][152])[154] [215]hen [210]eady [212]o [195]ontinue "
  79. 824 print"[154]      [207][210] [152]([210][197][212][213][210][206][152])[154] [212]o [193]bort [212]o [205]enu"
  80. 825 geta$:ifa$=""then 825
  81. 826 if a$=" "then 821
  82. 827 if a$=chr$(13)then 50
  83. 828 goto 825
  84. 830 gosub1600:open4,4
  85. 840 fornc=1tocc
  86. 850 print""
  87. 860 printtab(7)"[176][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][174]"
  88. 870 printtab(7)"[221] [194]  [221] [201]  [221] [206]  [221] [199]  [221] [207]  [221]"
  89. 880 printtab(7)"[171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"
  90. 890 fora=1to4
  91. 900 printtab(7)"[221]    [221]    [221]    [221]    [221]    [221]"
  92. 910 printtab(7)"[171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"
  93. 920 nexta
  94. 930 printtab(7)"[221]    [221]    [221]    [221]    [221]    [221]"
  95. 940 printtab(7)"[173][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][189]"
  96. 950 fora=1to5:b(a)=0
  97. 960 b=int(rnd(0)*15)+1
  98. 970 foraa=1toa:ifb(aa)=bgoto960
  99. 980 next aa
  100. 990 b(a)=b:nexta
  101. 1000 fora=1to5:i(a)=0
  102. 1010 i=int(rnd(0)*15)+16
  103. 1020 foraa=1toa:ifi(aa)=igoto1010
  104. 1030 next aa
  105. 1040 i(a)=i:nexta
  106. 1050 fora=1to5:n(a)=0
  107. 1060 n=int(rnd(0)*15)+31
  108. 1070 foraa=1toa:ifn(aa)=ngoto1060
  109. 1080 next aa
  110. 1090 n(a)=n:nexta
  111. 1100 fora=1to5:g(a)=0
  112. 1110 g=int(rnd(0)*15)+46
  113. 1120 foraa=1toa:ifg(aa)=ggoto1110
  114. 1130 next aa
  115. 1140 g(a)=g:nexta
  116. 1150 fora=1to5:o(a)=0
  117. 1160 o=int(rnd(0)*15)+61
  118. 1170 foraa=1toa:ifo(aa)=ogoto1160
  119. 1180 next aa
  120. 1190 o(a)=o:nexta
  121. 1200 print"";
  122. 1210 fora=1to5
  123. 1220 ifa=3thenprinttab(8)b(a)""tab(13)i(a)"free"g(a)""o(a)spc(13);
  124. 1225 ifa=3thengoto1240
  125. 1230 printtab(8)b(a)""tab(13)i(a)""n(a)""g(a)""o(a)spc(13);
  126. 1240 print:nexta
  127. 1250 dw$=chr$(14):sw$=chr$(15)
  128. 1260 gr$=chr$(8)
  129. 1270 c$(2)=dw$+"[221] b  [221] i  [221] n  [221] g  [221] o  [221]"+gr$
  130. 1280 c$(1)=dw$+"[176][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][178][192][192][192][192][174]"+gr$
  131. 1290 c$(3)=dw$+"[171][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][219][192][192][192][192][179]"+gr$
  132. 1300 c$(4)=dw$+"[221]    [221]    [221]    [221]    [221]    [221]"+gr$
  133. 1310 c$(5)=dw$+"[173][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][177][192][192][192][192][189]"+gr$
  134. 1320 fora=1to3
  135. 1330 print#4,c$(a):gosub1600:nexta
  136. 1340 fora=1to4:gosub1600
  137. 1350 print#4,c$(4):gosub1600
  138. 1360 print#4,dw$"[221]";:ifb(a)<10thenprint#4," ";
  139. 1370 print#4,b(a);
  140. 1380 print#4,"[221]"i(a);
  141. 1390 ifa=3thenprint#4,"[221]"sw$"  free  "dw$;:goto1410
  142. 1400 print#4,"[221]"n(a);
  143. 1410 print#4,"[221]"g(a);
  144. 1420 print#4,"[221]"o(a)"[221]"gr$
  145. 1430 print#4,c$(4):gosub1600
  146. 1440 print#4,c$(3):gosub1600
  147. 1450 nexta
  148. 1460 print#4,c$(4):gosub1600
  149. 1470 print#4,dw$"[221]";:ifb(a)<10thenprint#4," ";
  150. 1480 print#4,b(5);
  151. 1490 print#4,"[221]"i(5);
  152. 1500 print#4,"[221]"n(5);
  153. 1510 print#4,"[221]"g(5);
  154. 1520 print#4,"[221]"o(5)"[221]"gr$:gosub1600
  155. 1530 print#4,c$(4):gosub1600
  156. 1540 print#4,c$(5):gosub1600
  157. 1550 print#4
  158. 1560 ifnc/4=int(nc/4)thenprint#4,chr$(8);:formm=1to17:print#4:next
  159. 1570 gosub1600:next nc
  160. 1580 print"[196]one.":close4
  161. 1590 fora=1to2000:next:goto50
  162. 1600 rem do some thing
  163. 1610 print""tab(16)"[208]rinting"
  164. 1611 print"       [208]ress [198]1 [212]o [193]bort [212]o [205]enu       "
  165. 1620 printtab(7)"[206]umber left to print: ";right$("0"+mid$(str$(cc-nc),2),2)
  166. 1630 co=co+1:ifco=15thenco=1
  167. 1640 poke646,co
  168. 1650 geta$:ifa$="[133]"thenprint#4:close4:goto 50
  169. 1660 return
  170. 2000 poke646,(peek(646)and15)+1
  171. 2010 print""tab(15)"[176][192][192][192][192][192][192][174]"
  172. 2020 printtab(15)"[221]      [221]"
  173. 2030 printtab(15)"[173][192][192][192][192][192][192][189]":return
  174. 3000 print"      [197][206][196] [207][198] [199][193][205][197] -- [208][210][197][211][211] [210][197][212][213][210][206]     "
  175. 3010 ifpeek(203)<>1then3010
  176. 3020 goto10
  177. 60000 print"  [154][193]re you sure you want to quit? ([217][154]/[206][154])"
  178. 60010 a=peek(203):ifa<>25anda<>39then60010
  179. 60020 ifa=39thenprint"[145]                                      [145]":return
  180. 60030 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  181. 60040 ifer<>63thenen